<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="./vue.js"></script>
<script src="./vuex.js"></script>

<body>
  <div id="app">
    <p>{{this.$store.state.name}}</p>
  </div>


  <script>
    // 创建实例对象store
    let store = new Vuex.Store({
      state: {
        name: "vuex.js直接引用",
      }
    })

    const vm = new Vue({
      el: "#app",
      store,
    })
  </script>
</body>

</html>